<?php
$id=$_GET['id'];
//echo $id;
$status=$_GET['status'];
if($status==1)
{
    $status=2;
}
else{
    $status=1;
}
$dbh=new PDO('mysql:host=localhost;dbname=gaofei','root','root');
$sql="update zc set status=$status where id=$id";
$dbh->exec($sql);
header('location:show.php');